#!/usr/bin/env bash
------- 前置脚本--------
#1. 客户修改标签字段screenType
curl  http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"xbbCode":"123456","corpid":"1","corpidList":[],"userId":"1","platform":"web","frontDev":"1","businessType":100,"attr":"array_31","operate":1,"fieldAttr":"screenType"}'

#2. 市场活动修改标签字段screenType
curl  http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"xbbCode":"123456","corpid":"1","corpidList":[],"userId":"1","platform":"web","frontDev":"1","businessType":8100,"attr":"array_1","operate":1,"fieldAttr":"screenType"}'

#3. 销售线索修改标签字段screenType
curl  http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"xbbCode":"123456","corpid":"1","corpidList":[],"userId":"1","platform":"web","frontDev":"1","businessType":8000,"attr":"array_1","operate":1,"fieldAttr":"screenType"}'

#4. 新建BI 关于市场活动索引---统计脚本服务
 curl http://pt2jobs.xbongbong.com.cn/pro/v1/chart/init/initNewBiMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","corpid": "1","userId" : "1","code":8000,"xbbCode":"123456","platform": "web"}'

#5. 新建BI 关于销售线索索引---统计脚本服务
 curl http://pt2jobs.xbongbong.com.cn/pro/v1/chart/init/initNewBiMapping -X POST -H 'Content-type: application/json' -d '{"frontDev":"1","corpid": "1","userId" : "1","code":8100,"xbbCode":"123456","platform": "web"}'

#6. 销售机会阶段日志表，当前阶段输单/取消前上一阶段的日志,新开始同步时间为2021-4-23 19：00：00
 curl  http://127.0.0.1:2019/pro/v1/script/opportunity/fixLoseOpportunityBeforeStage -X POST -H 'Content-type: application/json' -d '{"corpid": "1","corpidList":[],"userId": "1","platform": "web","frontDev":"1","xbbCode": "123456","addTimeEnd":"1619175600"}'

#7. 线索阶段日志表，当前阶段无效前上一阶段的日志,新开始同步时间为2021-4-23 19：00：00
 curl  http://127.0.0.1:2019/pro/v1/script/clue/fixInvalidClueBeforeStage -X POST -H 'Content-type: application/json' -d '{"corpid": "1","corpidList":[],"userId": "1","platform": "web","frontDev":"1","xbbCode": "123456","addTimeEnd":"1619175600"}'
------- 前置脚本--------

 #8. 销售机会阶段日志表，当前阶段输单/取消前上一阶段的日志,增量开始同步时间为2021-4-23 19：00：00
 curl  http://127.0.0.1:2019/pro/v1/script/opportunity/fixLoseAndCancelOppBeforeStage -X POST -H 'Content-type: application/json' -d '{"corpid": "1","corpidList":[],"userId": "1","platform": "web","frontDev":"1","xbbCode": "123456","addTimeStart":"1619175600"}'


 #7. 线索阶段日志表，当前阶段无效前上一阶段的日志,增量开始同步时间为2021-4-23 19：00：00
 curl  http://127.0.0.1:2019/pro/v1/script/clue/fixInvalidClueBeforeStage -X POST -H 'Content-type: application/json' -d '{"corpid": "1","corpidList":[],"userId": "1","platform": "web","frontDev":"1","xbbCode": "123456","addTimeStart":"1619175600"}'
